package com.example.gymmanagement.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName field
 */
@TableName(value ="field")
@Data
public class Field implements Serializable {
    /**
     * 场地id
     */
    @TableId(value = "field_id", type = IdType.AUTO)
    private Long fieldId;

    /**
     * 场地名称
     */
    @TableField(value = "field_name")
    private String fieldName;

    /**
     * 场地状态
     */
    @TableField(value = "field_notice")
    private String fieldNotice;

    /**
     * 开放时间
     */
    @TableField(value = "field_time")
    private String fieldTime;

    /**
     * 关灯价格
     */
    @TableField(value = "field_price")
    private String fieldPrice;

    /**
     * 开灯价格
     */
    @TableField(value = "field_price_light")
    private String fieldPriceLight;

    /**
     * 场地详情
     */
    @TableField(value = "field_detail")
    private String fieldDetail;

    /**
     * 数据创建时间
     */
    @TableField(value = "field_createtime")
    private LocalDateTime fieldCreatetime;

    /**
     * 数据更新时间
     */
    @TableField(value = "field_updatetime")
    private LocalDateTime fieldUpdatetime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Field other = (Field) that;
        return (this.getFieldId() == null ? other.getFieldId() == null : this.getFieldId().equals(other.getFieldId()))
            && (this.getFieldName() == null ? other.getFieldName() == null : this.getFieldName().equals(other.getFieldName()))
            && (this.getFieldNotice() == null ? other.getFieldNotice() == null : this.getFieldNotice().equals(other.getFieldNotice()))
            && (this.getFieldTime() == null ? other.getFieldTime() == null : this.getFieldTime().equals(other.getFieldTime()))
            && (this.getFieldPrice() == null ? other.getFieldPrice() == null : this.getFieldPrice().equals(other.getFieldPrice()))
            && (this.getFieldPriceLight() == null ? other.getFieldPriceLight() == null : this.getFieldPriceLight().equals(other.getFieldPriceLight()))
            && (this.getFieldDetail() == null ? other.getFieldDetail() == null : this.getFieldDetail().equals(other.getFieldDetail()))
            && (this.getFieldCreatetime() == null ? other.getFieldCreatetime() == null : this.getFieldCreatetime().equals(other.getFieldCreatetime()))
            && (this.getFieldUpdatetime() == null ? other.getFieldUpdatetime() == null : this.getFieldUpdatetime().equals(other.getFieldUpdatetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFieldId() == null) ? 0 : getFieldId().hashCode());
        result = prime * result + ((getFieldName() == null) ? 0 : getFieldName().hashCode());
        result = prime * result + ((getFieldNotice() == null) ? 0 : getFieldNotice().hashCode());
        result = prime * result + ((getFieldTime() == null) ? 0 : getFieldTime().hashCode());
        result = prime * result + ((getFieldPrice() == null) ? 0 : getFieldPrice().hashCode());
        result = prime * result + ((getFieldPriceLight() == null) ? 0 : getFieldPriceLight().hashCode());
        result = prime * result + ((getFieldDetail() == null) ? 0 : getFieldDetail().hashCode());
        result = prime * result + ((getFieldCreatetime() == null) ? 0 : getFieldCreatetime().hashCode());
        result = prime * result + ((getFieldUpdatetime() == null) ? 0 : getFieldUpdatetime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", fieldId=").append(fieldId);
        sb.append(", fieldName=").append(fieldName);
        sb.append(", fieldNotice=").append(fieldNotice);
        sb.append(", fieldTime=").append(fieldTime);
        sb.append(", fieldPrice=").append(fieldPrice);
        sb.append(", fieldPriceLight=").append(fieldPriceLight);
        sb.append(", fieldDetail=").append(fieldDetail);
        sb.append(", fieldCreatetime=").append(fieldCreatetime);
        sb.append(", fieldUpdatetime=").append(fieldUpdatetime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}